﻿using System;
using EzDesk.Project.Model;
using System.Collections.Generic;
using EzDesk.EzAppApi.Utility.EzDeskAppApi;
using EzDesk.Project.Model.ViewModel;
namespace EzDesk.Project.Service
{
    public interface IProjectService
    {
        #region [ 项目类型相关 ]
        // 获取所有的项目类型
        IList<ProjectType> GetAllProjectTypes();
        #endregion

        #region [ 项目阶段类型相关 ]
        // 获得所有项目阶段类型
        IList<PlaneType> GetAllPlaneTypes();
        #endregion

        #region [ 项目本身与基本信息相关 ]
        Guid CreateProject(ProjectBasicInfo basicInfo, ProjectTeam teamInfo, SimpleUser creator);
        ProjectBasicInfo GetProjectBasicInfo(Guid guid);

        IList<ProjectBasicInfo> GetAllProjects();
        IList<ProjectViewModel> GetProjectForView(IList<ProjectBasicInfo> basicInfoList);
        #endregion

        #region [ 项目团队相关 ]
        ProjectTeam GetProjectTeam(Guid teamId);
        ProjectTeam GetProjectTeam(ProjectBasicInfo projectBasicInfo);
        #endregion

        #region [ 项目阶段任务相关 ]
        PlaneTaskViewModel GetPlaneTaskForView(Guid planeTaskId);

        IList<PlaneTask> GetPlanesFromProject(Guid projectId);
        PlaneTask GetPlaneTask(Guid planeTaskId);
        Guid CreatePlaneTask(PlaneTask newPlaneTask);
        #endregion

        #region [ 项目任务相关 ]
        IList<Task> GetChildTasks(Task parentTask);
        #endregion

        IList<ProjectBasicInfo> GetProjetList(bool? isClosed = false, string orderBy = "");
    }
}
